import request from '@/utils/request'

// 查询用户关注表列表
export function listFollowing(query) {
  return request({
    url: '/forum/following/list',
    method: 'get',
    params: query
  })
}

// 查询用户关注表详细
export function getFollowing(followingId) {
  return request({
    url: '/forum/following/' + followingId,
    method: 'get'
  })
}

// 新增用户关注表
export function addFollowing(data) {
  return request({
    url: '/forum/following',
    method: 'post',
    data: data
  })
}

// 修改用户关注表
export function updateFollowing(data) {
  return request({
    url: '/forum/following',
    method: 'put',
    data: data
  })
}

// 删除用户关注表
export function delFollowing(followedId) {
  return request({
    url: '/forum/following/' + followedId,
    method: 'delete'
  })
}

// userId查询用户关注表列表
export function listFollowingByUserId(query) {
  return request({
    url: '/forum/following/query',
    method: 'get',
    params: query
  })
}

  // userId查询用户关注表列表
  export function userList(id) {
    return request({
      url: '/forum/following/userId',
      method: 'get',
      params: {id}
    })
}


